<template>
  <view :style="themeColor">
    <view class="page">
      <!-- #ifdef APP-PLUS -->
      <view class="flex flex-wrap align-center justify-center benben-position-layout flex rticleDetails_flex_0"
        :style="{height:(88+StatusBarRpx)+'rpx',paddingTop:StatusBarRpx+'rpx', }">
        <view class='flex align-center justify-between flex-sub rticleDetails_fd0_0'>
          <view class='flex align-center self-center rticleDetails_fd0_0_c0' @tap.stop="handleJumpDiy" data-type="back"
            data-url="1">
            <text class='fu-iconfont2  rticleDetails_fd0_0_c0_c0'>&#xE794;</text>
          </view>
          <text class='rticleDetails_fd0_0_c1'>{{$t('消息详情')}}</text>
          <view class='flex align-center self-center justify-end rticleDetails_fd0_0_c0'>
            <image class='rticleDetails_fd0_0_c2_c0' mode="aspectFit" :src='STATIC_URL+"7.png"'
              @tap.stop="popupShow1703424864537=true"></image>
          </view>
        </view>

      </view>
      <view :style="{height: (88+StatusBarRpx)+'rpx'}"></view>
      <!-- #endif -->
      <view class="flex flex-direction align-stretch rticleDetails_flex_1">
        <text class='rticleDetails_fd1_0'>{{dataDetails.title}}</text>
        <text class='rticleDetails_fd1_1'>{{dataDetails.create_time}}</text>
        <jyf-parser class='rticleDetails_fd1_2' :html="dataDetails.text | richTextFormat">
        </jyf-parser>
      </view>


      <benben-popup v-model="popupShow1703424864537" :mask="true" :mask-close-able="false" mode='bottom' :z-index='999'>
        <!---分享flex布局开始-->
        <view class="flex flex-direction flex-wrap align-stretch benben-flex-layout">
          <view class='flex flex-direction flex-wrap align-stretch rticleDetails_fd2_0'>
            <view class='flex flex-wrap align-center justify-between rticleDetails_fd2_0_c0'>
              <view class='flex flex-wrap align-center rticleDetails_fd2_0_c0_c0'>
              </view>
              <view class='flex flex-wrap align-center justify-center rticleDetails_fd2_0_c0_c1'>
                <text class='rticleDetails_fd2_0_c0_c1_c0'>{{$t('分享到')}}</text>
              </view>
              <view class='flex flex-wrap align-center rticleDetails_fd2_0_c0_c2'>
                <image class='rticleDetails_fd2_0_c0_c2_c0' mode="aspectFit" :src='STATIC_URL+"100.png"'
                  @tap.stop="popupShow1703424864537=false"></image>
              </view>
            </view>
            <view class='flex flex-wrap align-center justify-around rticleDetails_fd2_0_c1'>
              <view class='flex flex-direction flex-wrap align-center' @click.stop="shareApp('1')">
                <image class='rticleDetails_fd2_0_c1_c0_c0' mode="aspectFit" :src='STATIC_URL+"11.png"'></image>
                <text class='rticleDetails_fd2_0_c1_c0_c1'>{{$t('微信好友')}}</text>
              </view>
              <view class='flex flex-direction flex-wrap align-center' @click.stop="shareApp('2')">
                <image class='rticleDetails_fd2_0_c1_c0_c0' mode="aspectFit" :src='STATIC_URL+"12.png"'></image>
                <text class='rticleDetails_fd2_0_c1_c0_c1'>{{$t('朋友圈')}}</text>
              </view>
            </view>
          </view>
        </view>

        <!---分享flex布局结束-->

      </benben-popup>


    </view>
  </view>
</template>
<script>
  import {
    validate
  } from '@/common/utils/validate.js'
  export default {
    components: {},


    data() {
      return {
        "popupShow1703424864537": false,
        "dataDetails": {
          "title": "",
          "img": "",
          "text": "",
          "aid": "",
          "create_time": ""
        },
        "id": "1"
      };
    },
    computed: {
      themeColor() {
        return this.$store.getters.themeColor
      },

    },
    watch: {},
    onLoad(options) {
      let {
        id
      } = options
      if (id !== undefined) this.id = id
      this.getDetailFunc()
    },
    onUnload() {

    },
    onReady() {

    },
    onShow() {

    },
    onHide() {

    },
    onResize() {

    },
    onPullDownRefresh() {

    },
    onReachBottom(e) {

    },
    onPageScroll(e) {

    },
    methods: {
      shareApp(type) {
        let that = this
        let provider = ''
        let scene = ''
        if (type == 1) {
          provider = 'weixin'
          scene = 'WXSceneSession'
        } else {
          provider = 'weixin'
          scene = 'WXSenceTimeline'
        }
        uni.share({
          provider: provider,
          scene: scene,
          type: '0',
          imageUrl: that.dataDetails.img,
          title: '加拿大靈巖山寺APP',
          href: that.dataDetails.h5_share,
          success: function(res) {
            console.log("success:" + JSON.stringify(res));
          },
          fail: function(err) {
            console.log("fail:" + JSON.stringify(err));
          }
        });
      },
      //文章列表-获取文章详情
      async getDetailFunc() {
        //请求方法
        //数据验证

        let datadataDetails = await this.$api.post(global.apiUrls.post65b88b4cec581, {
          aid: this.id
        });

        if (datadataDetails.data.code != 1) {
          this.$message.info(datadataDetails.data.msg);
          return
        }
        let infodataDetails = datadataDetails.data;
        this.dataDetails = infodataDetails.data

      }
    }
  };
</script>
<style lang="scss" scoped>
  .page {
    width: 100vw;
    overflow-x: hidden;
    min-height: calc(100vh - var(--window-bottom));
    background: rgba(247, 243, 237, 1);
    background-size: 100% auto;
  }

  .rticleDetails_flex_0 {
    background: rgba(247, 243, 237, 1);
    width: 750rpx;
    height: 88rpx;
    overflow: hidden;
    z-index: 10;
    top: 0rpx;
    background-size: 100% auto !important;
  }

  .rticleDetails_fd0_0_c2_c0 {
    width: 42rpx;
    height: 42rpx;
    border-radius: 0rpx 0rpx 0rpx 0rpx;
  }

  .rticleDetails_fd0_0_c1 {
    font-size: 36rpx;
    font-weight: 600;
    color: #333333;
  }

  .rticleDetails_fd0_0_c0_c0 {
    color: rgba(51, 51, 51, 1);
    font-size: 36rpx;
  }

  .rticleDetails_fd0_0_c0 {
    width: 120rpx;
  }

  .rticleDetails_fd0_0 {
    height: 88rpx;
    padding: 0rpx 32rpx 0rpx 32rpx;
  }

  .rticleDetails_flex_1 {
    padding: 25rpx 32rpx 16rpx 32rpx;
  }

  ::v-deep .rticleDetails_fd1_2 {
    width: 100%;
    padding: 32rpx 0rpx 32rpx 0rpx;
  }

  .rticleDetails_fd1_1 {
    color: #999999;
    font-size: 24rpx;
    line-height: 33rpx;
    font-weight: 400;
    margin: 24rpx 0rpx 0rpx 0rpx;
  }

  .rticleDetails_fd1_0 {
    font-size: 32rpx;
    line-height: 54rpx;
    font-weight: 500;
    color: #333333;
  }

  .rticleDetails_fd2_0_c1_c0_c1 {
    font-size: 24rpx;
    font-weight: 400;
    color: #333;
  }

  .rticleDetails_fd2_0_c1_c0_c0 {
    width: 80rpx;
    height: 80rpx;
    border-radius: 40rpx 40rpx 40rpx 40rpx;
    margin: 0rpx 0rpx 16rpx 0rpx;
  }

  .rticleDetails_fd2_0_c1 {
    padding: 0rpx 0rpx 58rpx 0rpx;
  }

  .rticleDetails_fd2_0_c0_c2_c0 {
    width: 40rpx;
    height: 40rpx;
    border-radius: 20rpx 20rpx 20rpx 20rpx;
  }

  .rticleDetails_fd2_0_c0_c2 {
    margin: 0rpx 2rpx 0rpx 0rpx;
  }

  .rticleDetails_fd2_0_c0_c1_c0 {
    font-size: 32rpx;
    font-weight: 400;
    color: #333333;
    margin: 0rpx 16rpx 0rpx 16rpx;
    line-height: 46rpx;
  }

  .rticleDetails_fd2_0_c0_c1 {
    padding: 40rpx 0rpx 48rpx 0rpx;
  }

  .rticleDetails_fd2_0_c0_c0 {
    width: 40rpx;
  }

  .rticleDetails_fd2_0_c0 {
    padding: 0rpx 13rpx 0rpx 0rpx;
  }

  .rticleDetails_fd2_0 {
    background: #fff;
    background-size: 100% auto !important;
    border-radius: 24rpx 24rpx 0rpx 0rpx;
    padding: 0rpx 32rpx 0rpx 32rpx;
  }
</style>
